﻿/*
 * GET home page.
 */
import express = require('express');
const router = express.Router();

router.get('/', (req: express.Request, res: express.Response) => {
    res.send({a:1,b:131});
});

import * as request from 'request';
router.get(`/testweb`, (req: express.Request, res: express.Response) => {
    let url = req.query.url;

    let options = {
        url: url,
        method: 'GET'
    };

    request.get(options, function (err, data) {
        res.send(data.body);
    });
});

export default router;